-- define an operator, that accesses elements one ket at a time:
op |*> #=>
sprint["input: "] |__self0>
sprint["one: "] |__self1>
|return var>
-- define a function that accesses the entire sequence, instead of ket-wise:
fn (*) #=>
sprint["input: "] |__self0>
sprint["one: "] |__self1>
|return var>
-- now invoke them:
-- noting that op was invoked 3 times, one for each ket in the input, while fn was invoked only once.
sa: op rank split |abc>
input: |__self0>
one: |a>
input: |__self0>
one: 2|b>
input: |__self0>
one: 3|c>
3|return var>
sa: fn rank split |abc>
input: |>
one: |a> + 2|b> + 3|c>
|return var>